package com.iatinspur.direct_memory;



import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;

import static java.nio.file.Files.createFile;

/**
 *
 */
public class ReadMemory {
    public static void main(String[] args) throws IOException {
//        RandomAccessFile file =new RandomAccessFile("shared_memory", "rw");
//        MappedByteBuffer buffer = file.getChannel().map(FileChannel.MapMode.READ_WRITE,0,1024);
//        byte[] bytes = new byte[buffer.capacity()];
//        buffer.get(bytes);
//        System.out.println(new String(bytes,StandardCharsets.UTF_8));
//        System.in.read();

    }
}
